GetResRate()

Cost Related Function

Syntax samples

GETRESRATE({<resource>})

GETRESRATE()

GETRESRATE(Operator1)

Description

Returns the cost rate specified in the Cost dialog or through the SETRATE() function for a resource currently owned by the entity making the function call. When used without the optional <resource> parameter, this function returns the cost rate of the entity’s most recently captured, owned resource.

If an entity owns multiple units of a resource, the function returns the cost rate of the entity’s most recently captured resource unit.

Valid In

Operation and move logic.

Components

<resource>

A resource currently owned by the entity making the function call. When you use GETRESRATE without this parameter, this function returns the cost rate of the entity’s most recently captured, owned resource.

Example

A clerk normally works an 8-hour shift. However, if the clerk does not finish entering all the orders in his Input_Queue at the end of the day, he must stay and finish them. Since the clerk is paid time-and-a-half for any overtime, you must increment the cost of the resource by an additional half of the normal rate to get the overtime rate. To do this, set a variable equal to 1 in the pre-off-shift logic for the resource, indicating the resource should go off-shift. If the variable is equal to 1, increment the cost of a resource by half the original rate. (Since each unit of the clerk has a different rate, you must obtain the cost rate for the resource owned by the entity.)

Process Table

Entity

Location

Opn (min)

Order

Order_desk

GET Clerk, 399

WAIT N (4.5, .3)

IF Off_Shift_Var=1

THEN INCRESCOST GETRESRATE() *.50

FREE Clerk

Routing Table

Blk

Output

Destination

Rule

Move Logic

1

Order

Shipping

FIRST 1

MOVE FOR 1

See Also

GETCOST(), INCENTCOST, INCLOCCOST, INCRESCOST, and SETRATE.